<%-- 
    Document   : calendario
    Created on : 31-may-2009, 20:16:12
    Author     : Ale
--%>

<%@page contentType="text/html" pageEncoding="UTF-8" session="false"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>

        <style type="text/css">@import url(./js/calendar-blue2.css);</style>
        <script type="text/javascript" src="./js/calendar.js"></script>
        <script type="text/javascript" src="./js/calendar-es.js"></script>
        <script type="text/javascript" src="./js/calendar-setup.js"></script>
    </head>
    <body>
        <div style="float: right; margin-left: 1em; margin-bottom: 1em;"
             id="calendar-container"></div>
        <script type="text/javascript">

            //El calendario utilizado
            function dateChanged(calendar) {
                // Beware that this function is called even if the end-user only
                // changed the month/year. In order to determine if a date was
                // clicked you can use the dateClicked property of the calendar:
                if (calendar.dateClicked) {
                    // OK, a date was clicked, redirect to /yyyy/mm/dd/index.php
                    var y = calendar.date.getFullYear();
                    var m = calendar.date.getMonth(); // integer, 0..11
                    var d = calendar.date.getDate(); // integer, 1..31
                    // redirect...
                    window.location = "/" + y + "/" + m + "/" + d + "/index.php";
                }
            };
            Calendar.setup(
            {
                flat : "calendar-container", // ID of the parent element
                flatCallback : dateChanged // our callback function
            }
        );
        </script>




    </body>
</html>
